@echo off
REM Set environment for Visual Studio
call "%programfiles(x86)%\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"

REM Build solution
msbuild /p:Configuration=Release

REM Ensure directories exist
mkdir build\lib\net35
mkdir build\lib\sl3

REM Copy nuspec and files from build
xcopy /y FluentUnity.Desktop\bin\Release\FluentUnity.dll build\lib\net35
xcopy /y FluentUnity.Silverlight\bin\Release\FluentUnity.dll build\lib\sl3

REM Package
tools\nuget.exe pack FluentUnity.nuspec -BasePath build

REM Publish
tools\nuget.exe push FluentUnity.1.0.2.nupkg

pause